package speed2010.util;

import speed2010.middleware.comunicacao.Address;

public class AddressESsm {
	private Address addressNode = null;
	private double ssm = -1;

	public AddressESsm(Address addressNode,  double ssm) {
		this.addressNode = addressNode;
		this.ssm = ssm;
	}

	public Address getAddressNode() {
		return addressNode;
	}

	@Override
	public boolean equals(Object obj) {
		if (this.addressNode.equals(((AddressESsm) obj).addressNode)				
				&& ssm == ((AddressESsm) obj).ssm) {
			return true;
		} else {
			return false;
		}
	}

	public void setAddressNode(Address addressNode) {
		this.addressNode = addressNode;
	}

	public double getSsm() {
		return ssm;
	}

	public void setSsm(double ssm) {
		this.ssm = ssm;
	}
	
	@Override
	public String toString(){
		return this.addressNode.toStringReduzido() + " - " + this.ssm;
	}
}
